package com.example.demo.service.impl;

import com.example.demo.mapper.Score1Mapper;
import com.example.demo.pojo.Score1;
import com.example.demo.service.Score1Service;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class Score1ServiceImpl implements Score1Service {

    @Resource
    private Score1Mapper score1Mapper;

    @Override
    public void addScore(Score1 score) {
        score1Mapper.addScore(score);
    }

    @Override
    public void deleteScore(Integer studentId) {
        score1Mapper.deleteById(studentId);
    }

    @Override
    public void updateScore(Score1 score) {
        score1Mapper.update(score);
    }

    @Override
    public List<Score1> getAllScores() {
        return score1Mapper.selectAll();
    }

    @Override
    public Score1 getScoreById(Integer studentId) {
        return score1Mapper.selectById(studentId);
    }
}












